﻿<%@ Page Language="C#" MasterPageFile="~/SiteAdmin/MasterPage.master" AutoEventWireup="true" CodeFile="ReqOutManager.aspx.cs" Inherits="ReqOutManager" Title="Untitled Page" %>
<%@ Register src="GoodItemOut.ascx" tagname="GoodItemOut" tagprefix="uc1" %>
<%@ Register src="../Controls/TipMessage/TipMessage.ascx" tagname="TipMessage" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="contentPlaceHolderID" Runat="Server">
<uc1:TipMessage ID="tipMessage1" runat="server" style="width:95%;" />
<asp:Panel ID="pnlGrid" runat="server" CssClass="centerPanel" Width="95%">
<div class="searchDiv" >
           <table cellspacing="0" class="searchTable">
            <tr>
                <td>
               任务单号：
                </td>
                <td>
                <asp:TextBox ID="S_TaskCode" runat="server" CssClass="smallInput" MaxLength="64" ></asp:TextBox>
                </td> 
                <td>
               出库单编号：
                </td>
                <td>
                <asp:TextBox ID="S_RequisitionCode" runat="server" CssClass="smallInput" MaxLength="64" ></asp:TextBox>
                </td>
                <td>
                领料日期：
                </td>
                <td>
                <asp:TextBox ID="S_RequisitionDate" runat="server" onfocus="calendar.ShowCaltable(this, event);" CssClass="smallInput" MaxLength="64" ></asp:TextBox>
                </td>
                <td>
                出库类型：
                </td>
                <td>
                <div class="select"><div><ofcc:DropDownList ID="S_RequisitionType" runat="server" ></ofcc:DropDownList></div></div>
                </td>
                <td>
                    &nbsp;&nbsp;<asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text=" 查询 "  CssClass="searchButton" />
                </td>
            </tr>
            </table>
     </div>
<div class="webPanelBorder" >
    <div class="webPanelCaption">出库管理</div>
    <div class="webPanelContent">
        <ofcc:GridView ID="gridView" runat="server" AutoGenerateColumns="False" 
            OnRowDataBound="gridView_RowDataBound" 
            onsplitpageindexchange="gridView_SplitPageIndexChange">
            <Columns>
                <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <input ID="RequisitionID" checked="checked" name="RequisitionID" type="radio" 
                            value='<%#DataBinder.Eval(Container.DataItem,"RequisitionID")%>' />
                        <asp:HiddenField ID = "HiddenField1" runat="server" Value='<%#Eval("RequisitionID") %>' />
                    </ItemTemplate>
                    <HeaderStyle Width="40px" />
                </asp:TemplateField>
                <asp:HyperLinkField DataTextField="RequisitionCode" HeaderText="出库单号" NavigateUrl="#"/> 
                <asp:BoundField DataField="RequisitionUser" HeaderText="申请人" />
                <asp:BoundField DataField="RequisitionDate" HeaderText="申请日期" />
                <asp:BoundField DataField="RequisitionTypeName" HeaderText="出库类型" />
                <asp:BoundField DataField="GetUser" HeaderText="领单人" />
                <asp:BoundField DataField="GetDate" HeaderText="领料日期" />
                <asp:BoundField DataField="UserName" HeaderText="经办人" />
                <asp:BoundField DataField="OrgName" HeaderText="经办部门" />
                <asp:BoundField DataField="Status" HeaderText="库房状态" />
            </Columns>
        </ofcc:GridView>
     </div>
</div>
<div class="webPanelButtonArea">
    <ofcc:LinkButton ID="btnAdd" runat="server" OnClick="btnAdd_Click" CssClass="linkButton" >新建领料单</ofcc:LinkButton>
    <ofcc:LinkButton ID="btnReceive" runat="server" OnClick="btnReceive_Click" CssClass="linkButton" >领料单出库</ofcc:LinkButton>
    <ofcc:LinkButton ID="btnEdit" runat="server" OnClick="btnEdit_Click" CssClass="linkButton" >修改领料单</ofcc:LinkButton>
    <ofcc:LinkButton ID="btnRemove" runat="server"  ConfirmMessage="确定要删除吗?" OnClick="btnRemove_Click" CssClass="linkButton" >删除领料单</ofcc:LinkButton>
    <ofcc:LinkButton ID="btnView" runat="server" OnClick="btnView_Click" CssClass="linkButton" >查看领料单</ofcc:LinkButton>
</div>
</asp:Panel>

<asp:Panel ID="pnlEdit" runat="server" Width="95%" Visible="false" CssClass="centerPanel">
    <asp:Panel ID="pnlTaskInfo" runat="server" Visible="false">
    <div class="webPanelBorder" >
    <div class="webPanelCaption">受理信息</div>
    <div class="webPanelContent">
        <table cellspacing="1" class="table">
                <tr>
                    <td class="tableSubjectWidth">单位/用户：
                    </td>
                    <td><asp:Literal ID="tbGuest" runat="server" ></asp:Literal>
                    </td>                    
                </tr>
                <tr> 
                    <td class="tableSubjectWidth">联系电话：
                    </td>
                    <td><asp:Literal ID="tbPhone" runat="server"></asp:Literal>
                    </td>
                </tr>   
                <tr> 
                    <td>楼号/区域：
                    </td>
                    <td><asp:Literal ID="cbHouseNo" runat="server"></asp:Literal>
                    </td>
                </tr>     
                <tr> 
                    <td>房间号：
                    </td>
                    <td ><asp:Literal ID="tbRoomNo" runat="server"></asp:Literal>
                    </td>
                </tr>             
                <tr>
                    <td>事由(要求)：</td>
                    <td><asp:Literal ID="tbTroubleDescription" runat="server" ></asp:Literal>
                    <br />
                    受理人：<asp:Label ID="lbUserID" runat="server" Text=""></asp:Label>&nbsp;
                    经办部门：<asp:Label ID="lbOrgID" runat="server" Text=""></asp:Label>&nbsp;
                    受理时间：<asp:Label ID="lbCreateDate" runat="server" Text=""></asp:Label>                    
                    </td>
                </tr>
                <tr> 
                    <td>是否领取物料：
                    </td>
                    <td ><asp:CheckBox ID="cbIsReqGood" runat="server" Enabled="false"></asp:CheckBox>
                    </td>
                </tr>  
             </table>
     </div></div>
     <div class="webPanelBorder">
           <div class="webPanelCaption">
                <asp:Label ID="showTitle" runat="server" Text="领单人员"></asp:Label>
           </div>
            <div class="webPanelContent">
                <ofcc:GridView ID="gridReceiverView" runat="server" AutoGenerateColumns="False">
                <Columns>        
                    <asp:BoundField DataField="OrgName" HeaderText="单位" />
                    <asp:BoundField DataField="UserName" HeaderText="姓名" />
                    <asp:BoundField DataField="GroupName" HeaderText="组别" />
                    <asp:BoundField DataField="Mobile" HeaderText="电话" />
                    <asp:BoundField DataField="Description" HeaderText="备注" />
                </Columns>
                </ofcc:GridView> 
            </div>
        </div>
     </asp:Panel>
    
    
    <div class="webPanelBorder" >
        <div class="webPanelCaption">领料单信息</div>
        <div class="webPanelContent">
             <table cellspacing="1" class="table">
                <tr>
                    <td class="tableSubjectWidth">申 请 人：
                    </td>
                    <td><asp:TextBox ID="P_RequisitionUser" runat="server" CssClass="shortInput" MaxLength="64" ></asp:TextBox>
                        <ofcc:RequiredField ID="RequiredField1" runat="server" />
                    </td>
                    <td class="tableSubjectWidth">申请时间：
                    </td>
                    <td><asp:TextBox ID="P_RequisitionDate" onfocus="calendar.ShowCaltable(this, event);" runat="server" CssClass="shortInput" MaxLength="64" ></asp:TextBox>
                        <ofcc:RequiredField ID="RequiredField3" runat="server" />
                    </td>
                </tr>
                <tr>  
                    <td>出库类型：
                    </td>
                    <td><ofcc:DropDownList ID="P_RequisitionType" runat="server" CssClass="smallInput"></ofcc:DropDownList>
                        <ofcc:RequiredField ID="RequiredField2" runat="server" />
                    </td> 
                    <td>备    注：</td>
                    <td><asp:TextBox ID="P_Description" runat="server" CssClass="shortInput" MaxLength="64"></asp:TextBox>
                    </td>
                </tr>
                <tr> 
                    <td>领 料 人：</td>
                    <td> 
                        <asp:UpdatePanel runat="server" ID="UpdatePanel1">
                            <ContentTemplate>
                                <asp:TextBox ID="P_GetUser" runat="server" CssClass="smallInput" MaxLength="64"></asp:TextBox>
                                <asp:Label ID="lbGetUserName" runat="server" Text=""></asp:Label>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                    <td>领料日期：</td>
                    <td><asp:TextBox ID="P_GetDate" onfocus="calendar.ShowCaltable(this, event);" runat="server" CssClass="shortInput" MaxLength="64" ></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>经 办 人：</td>
                    <td><asp:TextBox  ID="P_LoginName" ReadOnly="true" runat="server" CssClass="shortInput" MaxLength="64"></asp:TextBox>
                    </td>
                    <td>经办部门：</td>
                    <td><asp:TextBox  ID="P_Department" ReadOnly="true" runat="server" CssClass="shortInput" MaxLength="64"></asp:TextBox>
                    </td>
                </tr> 
            </table>            
        </div> 
    </div>
    
    
   <asp:Panel ID="pnlTaskGood" runat="server">
        <asp:UpdatePanel runat="server" ID="UpdatePanel2">
            <ContentTemplate> 
                 <uc1:GoodItemOut ID="GoodItemOut" runat="server" />
                 <asp:Panel ID="pnlSearchGoodCode" runat="server" Visible=false>
                    <span style="float:left">物料编号:&nbsp;<ofcc:ToolTip CssClass="tip" ToolTip="扫描或者输入编号后按回车"  ID="ToolTip2" runat="server" />
                    &nbsp;&nbsp;<asp:TextBox ID="tbGoodCode" runat="server" CssClass="smallInput"></asp:TextBox></span>
                 </asp:Panel>
            </ContentTemplate>
        </asp:UpdatePanel>
    </asp:Panel>  
    <div class="webPanelButtonArea">
        <ofcc:LinkButton ID="btnSearchGoodCode" runat="server" OnClick="btnSearchGoodCode_Click" CssClass="linkButton" >扫描物料</ofcc:LinkButton>
        <ofcc:LinkButton ID="btnSelect" runat="server" OnClick="btnSelect_Click" CssClass="linkButton" ValidationGroup="select">选择</ofcc:LinkButton>
        <ofcc:LinkButton ID="btnSave" runat="server" ConfirmMessage="确定保存领料单吗？" OnClick="btnSave_Click" CssClass="linkButton" ValidationGroup="submit">保存</ofcc:LinkButton>
        <ofcc:LinkButton ID="btnGetOut" runat="server" ConfirmMessage="出库后将不能被删除或修改操作，是否确定要出库?" OnClick="btnGetOut_Click" CssClass="linkButton" ValidationGroup="submit">出库</ofcc:LinkButton>
        <ofcc:LinkButton ID="btnCancel" runat="server" OnClick="btnCancel_Click"  CssClass="linkButton">取消</ofcc:LinkButton>
    </div>
    
  <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="P_RequisitionDate"
    Display="None" ErrorMessage="请选择申请日期" ValidationGroup="submit"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="P_RequisitionType"
    Display="None" ErrorMessage="请选择出库类型" ValidationGroup="submit"></asp:RequiredFieldValidator>
   
</asp:Panel>

    <asp:HiddenField ID="hfAddOrEdit" runat="server" />
    <asp:HiddenField ID="hfRequisitionID" runat="server" />
<asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableViewState="False"
    ShowMessageBox="True" ShowSummary="False" ValidationGroup="submit" />
    
</asp:Content>

